﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package gaia.moga.friendlist.service {
    import com.gaiaonline.monster.model.*;
    import gaia.moga.friendlist.model.*;
    import com.gaiaonline.monster.service.process.*;
    import com.gaiaonline.monster.service.*;

    public class UpdateFriends extends GSIProcess {

		[Inject]
        public var app:ApplicationModel;
		[Inject]
        public var model:FriendsModel;
        [Inject]
		public var server:GSIDataService;

        public function UpdateFriends(){
            super("UpdateFriends");
        }
        override protected function onInit():void{
            if (this.model.isInited){
                asyncComplete();
            } else {
                this.server.getFriends(this);
            };
        }
        override protected function parse(_arg1:Object):Boolean{
            if (_arg1.error){
                return (false);
            };
            this.model.isInited = true;
            this.model.update(_arg1.friends);
            return (true);
        }

    }
}//package gaia.moga.friendlist.service 
